00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef _linear_matrix_solver_interface_hpp_
00022 #define _linear_matrix_solver_interface_hpp_
00023
00024 #include "gridpack/parallel/distributed.hpp"
00025 #include "gridpack/configuration/configurable.hpp"
00026 #include "gridpack/utilities/uncopyable.hpp"
00027 #include "gridpack/math/matrix.hpp"
00028
00029
00030 namespace gridpack {
00031 namespace math {
00032
00033
00034
00035
00036 template <typename T, typename I = int>
00037 class BaseLinearMatrixSolverInterface
00038 {
00039 public:
00040
00041 typedef MatrixT<T, I> MatrixType;
00042
00043
00044 BaseLinearMatrixSolverInterface(void)
00045 {}
00046
00047
00048
00049 virtual ~BaseLinearMatrixSolverInterface(void)
00050 {}
00051
00052
00053 MatrixType *solve(const MatrixType& B) const
00054 {
00055 return this->p_solve(B);
00056 }
00057
00058 protected:
00059
00060
00061 virtual MatrixType *p_solve(const MatrixType& B) const = 0;
00062
00063 };
00064
00065
00066
00067
00068 }
00069 }
00070
00071 #endif